
HIS_DRIVERS= 

ifeq ($(PLATFORM), HI3531)
HIS_DRIVERS +=				\
	hi3531_vou.ko			\
	hi3531_dsu.ko			\
	hi3531_vdec.ko			\
	hi3531_mpeg4e.ko		\
	hi3531_tde.ko			\
	vcmp.ko					\
	mmz.ko					\
	hi3531_h264e.ko			\
	hi3531_jpege.ko			\
	hidmac.ko				\
	hi3531_pciv_fmw.ko		\
	hi3531_vda.ko			\
	hi3531_ao.ko			\
	hi3531_group.ko			\
	hi3531_base.ko			\
	hi3531_chnl.ko			\
	jpeg.ko					\
	hi3531_region.ko		\
	hi3531_ai.ko			\
	pcie/mcc_usrdev_host.ko	\
	pcie/pcit_dma_host.ko	\
	pcie/mcc_drv_host.ko	\
	pcie/hi35xx_dev_host.ko	\
	hi3531_vpss.ko			\
	hi3531_rc.ko			\
	hi3531_viu.ko			\
	hi3531_adec.ko			\
	hi3531_pciv.ko			\
	hi3531_ive.ko			\
	hi3531_vfmw.ko			\
	hifb.ko					\
	hi3531_venc.ko			\
	hi3531_hdmi.ko			\
	hi3531_sio.ko			\
	hi3531_sys.ko			\
	hiuser.ko				\
	hi3531_aenc.ko
endif

ifeq ($(PLATFORM), HI3531A)
HIS_DRIVERS +=				\
	hi3531a_aio.ko			\
	hi3531a_hdmi.ko			\
	hi3531a_pciv.ko			\
	hi3531a_vda.ko			\
	hi3531a_viu.ko			\
	hi_rtc.ko				\
	hi3531a_ao.ko			\
	hi3531a_ive.ko			\
	hi3531a_rc.ko			\
	hi3531a_vdec.ko			\
	hi3531a_vou.ko			\
	hiuser.ko				\
	hi3531a_adec.ko			\
	hi3531a_base.ko			\
	hi3531a_jpegd.ko		\
	hi3531a_region.ko		\
	hi3531a_venc.ko			\
	hi3531a_vpss.ko			\
	hi3531a_aenc.ko			\
	hi3531a_chnl.ko			\
	hi3531a_jpege.ko		\
	hi3531a_sys.ko			\
	hi3531a_vfmw.ko			\
	hifb.ko					\
	mmz.ko					\
	hi3531a_ai.ko			\
	hi3531a_h264e.ko		\
	hi3531a_pciv_fmw.ko		\
	hi3531a_tde.ko			\
	hi3531a_vgs.ko			\
	hi_media.ko
endif

ifeq ($(PLATFORM), HI3535)
HIS_DRIVERS +=			\
	hi3535_vou.ko		\
	hi3535_vdec.ko		\
	hi3535_tde.ko		\
	mmz.ko				\
	hi3535_h264e.ko		\
	hi3535_jpege.ko		\
	hi3535_pciv_fmw.ko	\
	hi3535_vda.ko		\
	hi3535_ao.ko		\
	hi3535_base.ko		\
	hi3535_chnl.ko		\
	hi3535_jpegd.ko 	\
	hi3535_jpege.ko 	\
	hi3535_region.ko	\
	hi3535_ai.ko		\
	hi3535_vpss.ko		\
	hi3535_rc.ko		\
	hi3535_adec.ko		\
	hi3535_pciv.ko		\
	hi3535_ive.ko		\
	hi3535_vfmw.ko		\
	hifb.ko				\
	hi3535_venc.ko		\
	hi3535_hdmi.ko		\
	hi3535_sys.ko		\
	hiuser.ko			\
	acodec.ko			\
	hi3535_aio.ko		\
	hi3535_vgs.ko		\
	hi3535_aenc.ko
endif

ifeq ($(PLATFORM), HI3536)
HIS_DRIVERS +=			\
	acodec.ko			\
	hi3536_adec.ko		\
	hi3536_aenc.ko		\
	hi_media.ko		\
	hi3536_ai.ko		\
	hi3536_aio.ko		\
	hi3536_ao.ko		\
	hi3536_base.ko		\
	hi3536_hdmi.ko		\
	hi3536_ive.ko		\
	hi3536_jpegd.ko		\
	hi3536_pciv.ko		\
	hi3536_region.ko	\
	hi3536_sys.ko		\
	hi3536_tde.ko		\
	hi3536_vda.ko		\
	hi3536_vdec.ko		\
	hi3536_venc.ko		\
	hi3536_vgs.ko		\
	hi3536_viu.ko		\
	hi3536_vou.ko		\
	hi3536_vpss.ko		\
	hi_media.ko			\
	hifb.ko				\
	hiuser.ko			\
	mmz.ko
ifeq ($(DUAL_CORE_CPU_MODE), true)
HIS_DRIVERS +=			\
	hi3536_pciv_fmwm.ko
else
HIS_DRIVERS +=			\
	hi3536_chnl.ko		\
	hi3536_h264e.ko		\
	hi3536_jpege.ko		\
	hi3536_pciv_fmw.ko	\
	hi3536_rc.ko 		\
	hi3536_vfmw.ko
endif
endif

# Ko names in 3521 glibc SDK are the same to 3521 uclibc SDK
ifeq ($(PLATFORM), HI3521)
	COPY_3521_KO = true
endif
ifeq ($(PLATFORM), HI3521_UCLIBC)
	COPY_3521_KO = true
endif
ifeq ($(COPY_3521_KO), true)
HIS_DRIVERS +=			\
	hi3521_h264e.ko		\
	hi3521_vfmw.ko		\
	hi3521_viu.ko		\
	hi3521_vda.ko		\
	hi3521_ive.ko		\
	vcmp.ko				\
	mmz.ko				\
	hi3521_ao.ko		\
	hi3521_group.ko		\
	hi3521_base.ko		\
	hi3521_region.ko	\
	hidmac.ko			\
	hi3521_tde.ko		\
	hi3521_sys.ko		\
	hi3521_vpss.ko		\
	hi3521_jpege.ko		\
	hi3521_vdec.ko		\
	hi3521_adec.ko		\
	hi3521_venc.ko		\
	hi3521_vou.ko		\
	jpeg.ko				\
	hi3521_sio.ko		\
	hi3521_chnl.ko		\
	hi3521_rc.ko		\
	hi3521_ai.ko		\
	hi3521_hdmi.ko		\
	hi3521_dsu.ko		\
	hifb.ko				\
	hiuser.ko			\
	hi3521_aenc.ko
endif

# Ko names in 3520A glibc SDK are the same to 3520A uclibc SDK
ifeq ($(PLATFORM), HI3520A)
	COPY_3520A_KO = true
endif
ifeq ($(PLATFORM), HI3520A_UCLIBC)
	COPY_3520A_KO = true
endif
ifeq ($(COPY_3520A_KO), true)
HIS_DRIVERS +=			\
	hi3520A_h264e.ko	\
	hi3520A_vfmw.ko		\
	hi3520A_viu.ko		\
	hi3520A_vda.ko		\
	hi3520A_ive.ko		\
	vcmp.ko				\
	mmz.ko				\
	hi3520A_ao.ko		\
	hi3520A_group.ko	\
	hi3520A_base.ko		\
	hi3520A_region.ko	\
	hidmac.ko			\
	hi3520A_tde.ko		\
	hi3520A_sys.ko		\
	hi3520A_vpss.ko		\
	hi3520A_jpege.ko	\
	hi3520A_vdec.ko		\
	hi3520A_adec.ko		\
	hi3520A_venc.ko		\
	hi3520A_vou.ko		\
	jpeg.ko				\
	hi3520A_sio.ko		\
	hi3520A_chnl.ko		\
	hi3520A_rc.ko		\
	hi3520A_ai.ko		\
	hi3520A_hdmi.ko		\
	hi3520A_dsu.ko		\
	hifb.ko				\
	hiuser.ko			\
	hi3520A_aenc.ko
endif

ifeq ($(PLATFORM), HI3520D)
HIS_DRIVERS +=			\
	hi3520D_h264e.ko	\
	hi3520D_vfmw.ko		\
	hi3520D_viu.ko		\
	hi3520D_vda.ko		\
	hi3520D_ive.ko		\
	vcmp.ko				\
	mmz.ko				\
	hi3520D_ao.ko		\
	hi3520D_group.ko	\
	hi3520D_base.ko		\
	hi3520D_region.ko	\
	hi3520D_tde.ko		\
	hi3520D_sys.ko		\
	hi3520D_vpss.ko		\
	hi3520D_jpege.ko	\
	hi3520D_vdec.ko		\
	hi3520D_adec.ko		\
	hi3520D_venc.ko		\
	hi3520D_vou.ko		\
	jpeg.ko				\
	hi3520D_sio.ko		\
	hi3520D_chnl.ko		\
	hi3520D_rc.ko		\
	hi3520D_ai.ko		\
	hi3520D_hdmi.ko		\
	hi3520D_dsu.ko		\
	hifb.ko				\
	hiuser.ko			\
	hi3520D_aenc.ko
endif

ifeq ($(PLATFORM), HI3520D_V300)
COPY_3521A_KO = true
endif

ifeq ($(PLATFORM), HI3521A)
COPY_3521A_KO = true
endif

ifeq ($(COPY_3521A_KO), true)
HIS_DRIVERS +=			\
	hi3521a_adec.ko		\
	hi3521a_aenc.ko		\
	hi3521a_ai.ko		\
	hi3521a_aio.ko		\
	hi3521a_ao.ko		\
	hi3521a_base.ko		\
	hi3521a_chnl.ko		\
	hi3521a_h264e.ko	\
	hi3521a_hdmi.ko		\
	hi3521a_ive.ko		\
	hi3521a_jpegd.ko	\
	hi3521a_jpege.ko	\
	hi3521a_rc.ko		\
	hi3521a_region.ko	\
	hi3521a_sys.ko		\
	hi3521a_tde.ko		\
	hi3521a_vda.ko		\
	hi3521a_vdec.ko		\
	hi3521a_venc.ko		\
	hi3521a_vfmw.ko		\
	hi3521a_vgs.ko		\
	hi3521a_viu.ko		\
	hi3521a_vou.ko		\
	hi3521a_vpss.ko		\
	hifb.ko				\
	hi_media.ko			\
	hi_rtc.ko			\
	hiuser.ko			\
	mmz.ko
endif

ifeq ($(PLATFORM), HI3516C)
HIS_DRIVERS +=			\
	hi3518_adec.ko		\
	hi3518_aenc.ko		\
	hi3518_ai.ko		\
	hi3518_ao.ko		\
	hi3518_base.ko		\
	hi3518_chnl.ko		\
	hi3518_dsu.ko		\
	hi3518_group.ko		\
	hi3518_h264e.ko		\
	hi3518_isp.ko		\
	hi3518_ive.ko		\
	hi3518_jpege.ko		\
	hi3518_rc.ko		\
	hi3518_region.ko	\
	hi3518_sio.ko		\
	hi3518_sys.ko		\
	hi3518_tde.ko		\
	hi3518_vda.ko		\
	hi3518_venc.ko		\
	hi3518_viu.ko		\
	hi3518_vou.ko		\
	hi3518_vpss.ko		\
	hidmac.ko			\
	hifb.ko				\
	hi_rtc.ko			\
	hiuser.ko			\
	mmz.ko
endif

ifeq ($(PLATFORM), HI3532)
HIS_DRIVERS += 				\
	hi3532_ai.ko 			\
	hi3532_mpeg4e.ko 		\
	hi3532_vpss.ko 			\
	hi3532_ive.ko 			\
	mmz.ko 					\
	hi3532_aenc.ko 			\
	hi3532_vda.ko 			\
	hidmac.ko 				\
	hi3532_pciv_fmw.ko 		\
	hi3532_vdec.ko 			\
	hi3532_h264e.ko 		\
	hi3532_tde.ko 			\
	hi3532_region.ko 		\
	jpeg.ko 				\
	hi3532_hdmi.ko 			\
	pcie/hi35xx_dev_slv.ko 	\
	pcie/pcit_dma_slv.ko 	\
	pcie/mcc_drv_slv.ko 	\
	pcie/mcc_usrdev_slv.ko	\
	hi3532_rc.ko 			\
	hi3532_venc.ko 			\
	hi3532_adec.ko 			\
	hi3532_dsu.ko 			\
	hi3532_viu.ko 			\
	hi3532_ao.ko 			\
	hi3532_pciv.ko 			\
	hifb.ko 				\
	hi3532_chnl.ko 			\
	hi3532_vou.ko 			\
	hi3532_group.ko 		\
	hi3532_jpege.ko 		\
	hi3532_sys.ko 			\
	hi3532_vfmw.ko 			\
	hi3532_base.ko 			\
	hiuser.ko				\
	hi3532_sio.ko
endif

OUTPUT_KO_DIR=$(OUTPUT_USR_LIB)
ifeq ($(BUILD_SLAVE_CHIP), true)
OUTPUT_KO_DIR=$(OUTPUT_ROOT_FS)/usr/lib/
endif

FS_COPY_DRIVER_CMD = \
	@for x in $(HIS_DRIVERS);	\
	do			\
	$(MKDIR) -p $(OUTPUT_KO_DIR);\
	if [[ ! -f $(HISIL_DRV_PATH)/$$x ]];then	\
		$(ECHO) "*** Error: $(HISIL_DRV_PATH)/$$x not exist";	\
		break;	\
	fi;	\
	$(CP) -uv $(HISIL_DRV_PATH)/$$x $(OUTPUT_KO_DIR);\
	done
FS_USR_CLEAN_CMD= $(RM) $(OUTPUT_KO_DIR)/*.ko
	
# vim:noet:sw=4:ts=4

